<template>
	<view class="department">
		<view class="department_title font15 font-323232 font-b">{{dataobj.name}}</view>
		<view class="department_box">
			<view class="font-7d766b font14">科室地址</view>
			<text class="font-323232 font14">{{dataobj.addr}}</text>
		</view>
		<view class="department_box">
			<view class="font-7d766b font14">科室电话</view>
			<text class="font-323232 font14">{{dataobj.tel}}</text>
		</view>
		<view class="department_info font-323232 font14">
			<rich-text :nodes="dataobj.content"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad: function(options) {
			this.id = options.id
			//获取详情
			this.Onroomdetails()
		},
		data() {
			return {
				id: null, //id
				dataobj:{},//返回数据
			}
		},
		methods: {
			Onroomdetails() {
				this.$Http({
					url: 'roomDetails',
					data: {
						room_id: this.id
					}
				}).then(res => {
					res.data.content = res.data.content?res.data.content.replace(/\<img/g,'<img style="display: block;max-width: 100%;height: auto;"'):''
					this.dataobj = res.data
				})
			}
		}
	}
</script>

<style>
	.department_title {
		height: 100rpx;
		line-height: 100rpx;
		width: 750rpx;
		text-align: center;
		border-bottom: 1rpx solid #eeeeee;
	}

	.department_box {
		display: flex;
		padding: 0 30rpx;
		margin-top: 30rpx;
	}

	.department_box view {
		width: 150rpx;
	}

	.department_info {
		padding: 0 30rpx;
		margin-top: 30rpx;
		line-height: 50rpx;
	}
	
	.rich-img {
		width: 690rpx !important;
	}
</style>
